import {toPay} from '@/services/pay'
//  支付测试
const namespace = 'pay';
const selectState = state => state[namespace];

const Model = {
  namespace,
  state: {
    topics: []
  },
  effects: {
    * fetchPay(_, {call}) {
      const result = yield call(toPay);
      // eslint-disable-next-line no-console
      console.log(result.data);
      // eslint-disable-next-line no-restricted-globals
      location.href = result.data.re_url;
    },
  }
};

export default Model;


